#!/bin/bash
# DarkMark (C) 2019 Stephane Charette <stephanecharette@gmail.com>
# $Id$


echo "Postrm: $@"


if [ "$1" = upgrade ]; then
	# nothing (yet!) to do in postrm for upgrades
	true
fi


if [ "$1" = remove -o "$1" = abort-install -o "$1" = disappear ]; then

	if [ -x "$(which xdg-icon-resource)" ]; then
		xdg-icon-resource uninstall --context apps --mode system --size 256 DarkMark-Logo
		xdg-icon-resource uninstall --context apps --mode system --size 128 DarkMark-Logo
		xdg-icon-resource uninstall --context apps --mode system --size 64  DarkMark-Logo
		xdg-icon-resource uninstall --context apps --mode system --size 48  DarkMark-Logo
		xdg-icon-resource uninstall --context apps --mode system --size 32  DarkMark-Logo
		xdg-icon-resource uninstall --context apps --mode system --size 22  DarkMark-Logo
		xdg-icon-resource uninstall --context apps --mode system --size 16  DarkMark-Logo
	fi

	if [ -x "$(which xdg-desktop-icon)" ]; then
		xdg-desktop-icon uninstall ccoderun-darkmark.desktop
	fi

	if [ -x "$(which xdg-desktop-menu)" ]; then
		xdg-desktop-menu uninstall --mode system ccoderun-darkmark.desktop
	fi

fi


exit 0

